#   -*- mode: makefile; coding: utf-8; -*-
#
#   Copyright 2008 Asier Aguirre <asier.aguirre@gmail.com>
#   This file is part of Intromit.
#
#   Intromit is free software: you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation, either version 3 of the License, or
#   (at your option) any later version.
#
#   Intromit is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with Intromit.  If not, see <http://www.gnu.org/licenses/>.

SUBDIRS = src etc test doc
EXTRA_DIST = VERSION README COPYING acinclude.m4 dep/dep.tar.gz
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure config config.cache

clean-local:
	rm -f *~

maintainer-clean-local:
	rm -fr $(ac_aux_dir)
	rm -f @PACKAGE@-*.tar.gz
	rm -rf autom4te.cache aclocal.m4

doc-dummy:

doc: doc-dummy
	$(MAKE) -C doc doc

install-fast:
	make -C src install-fast

# The following target is only for developers and is not intended
# to be portable. Note that it will change package configuration.
# Also note that warning are not allowed.
test-all-compilers:
	@for CXX in /usr/bin/g++?* ; do \
	    echo -e "\nCompiling with $$CXX\n" ; \
	    if ! ( CXXFLAGS=-Werror CXX=$$CXX \
		./configure --enable-optim && \
		make clean all ) ; then break ; fi ; \
	    if ! ( CXXFLAGS=-Werror CXX=$$CXX \
		./configure --disable-optim && \
		make clean all ) ; then break ; fi ; \
	done
